<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            height: 50px;
            margin: auto;
            text-align: center;
        }
        
        #box1 {
            width: 100px;
            height: 100px;
            background-color: black;
            margin-top: 20px;
            margin: auto;
        }
    </style>
</head>

<body>
    <div class="box">
        <button onclick="width()">变宽</button>
        <button onclick="height()">变高</button>
        <button onclick="color()">变色</button>
        <button onclick="hide()">隐藏</button>
        <button onclick="reset()">重置</button>
    </div>
    <div id="box1"></div>
</body>

<script type="text/javascript">
    var zsc = document.getElementById('box1');
    //变宽
    function width() {
        zsc.style.width = "200px"
    }
    //变高
    function height() {
        zsc.style.height = "200px"
    }
    //变色
    function color() {
        zsc.style.backgroundColor = "pink"
    }
    //影藏
    function hide() {
        zsc.style.display = "none"
    }
    //重置
    function reset() {
        zsc.style = ""
    }
</script>

</html>